#pragma config(Sensor, in1,    rightFollower,  sensorLineFollower)
#pragma config(Sensor, in2,    middleFollower, sensorLineFollower)
#pragma config(Sensor, in3,    leftFollower,   sensorLineFollower)
#pragma config(Sensor, dgtl1,  leftEncoder,    sensorQuadEncoder)
#pragma config(Sensor, dgtl3,  rightEncoder,   sensorQuadEncoder)
#pragma config(Sensor, dgtl5,  anything,       sensorSONAR_inch)
#pragma config(Motor,  port1,           rightMotor,    tmotorVex393, openLoop, reversed)
#pragma config(Motor,  port10,          leftMotor,     tmotorVex393, openLoop)
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//

task main()
{
wait1Msec(2000);
while(SensorValue[rightEncoder]<=1277 || SensorValue[leftEncoder]<=1277)
{
    if(SensorValue[rightEncoder] == SensorValue[leftEncoder])
{
    	motor[rightMotor] = -100;
      motor[leftMotor] = 100;
}
else if(SensorValue[rightEncoder] > SensorValue[leftEncoder])
{
	motor[rightMotor] = -50;
	motor[leftMotor] = 100;
}
else
{
	motor[rightMotor] = -100;
	motor[leftMotor] = 50;
}
} // first line
motor[rightMotor] = 0;
motor[leftMotor] = 0;
wait1Msec(1000);
motor[rightMotor] = 50;
motor[leftMotor] = 50;
wait1Msec(2000);
{

}
}
